
#include "error.h"


#if defined (__AVR_ATmega8__)
	#include "uart.h"
#elif defined (__AVR_ATmega16__)

#endif



void SetError(unsigned char error_code)
{


	#if defined (__AVR_ATmega8__)

	switch (error_code)
	{
		case NO_ERROR:

		break;
		case TRANSMIT_TIMEOUT:
			uart_puts_P( "[e|1|Transmit Timeout]" );
		break;
		case REPLY_TIMEOUT:
			uart_puts_P( "[e|2|Reply timeout]" );
		break;
		case RECEIVED_PACKET_CRC_ERROR:
			uart_puts_P( "[e|3|Transmit Timeout]" );
		break;
		case PARSER_RECEIVE_BUFOR_OVERFLOW:
			uart_puts_P( "[e|4|Received packet CRC error]" );
		break;
		case UNKNOWN_COMMAND:
			uart_puts_P( "[e|5|Unknown command]" );
		break;
	}


	#elif defined (__AVR_ATmega16__)

	switch (error_code)
	{
		case NO_ERROR:

		break;
		case TRANSMIT_TIMEOUT:

		break;
		case REPLY_TIMEOUT:

		break;
		case RECEIVED_PACKET_CRC_ERROR:

		break;
		case PARSER_RECEIVE_BUFOR_OVERFLOW:

		break;
		case UNKNOWN_COMMAND:

		break;
	}

	#endif



}
